package backstage.menu.vo;

import java.sql.Timestamp;
import java.util.List;

import backstage.menu.pojo.SysMenu;

public class SysMenuVo {

	private Integer id;
	private String labeling;
	private String name;
	private String url;
	private String onlabeling;
	private int state;
	private Timestamp creation;
	private Integer orders;
	private boolean checkGroup;
	private List<SysMenuVo> children;

	public SysMenuVo() {
		super();
	}
	
	public SysMenuVo(SysMenu menu) {
		super();
		this.id = menu.getId();
		this.labeling = menu.getLabeling();
		this.name = menu.getName();
		this.url = menu.getUrl();
		this.onlabeling = menu.getOnlabeling();
		this.state = menu.getState();
		this.creation = menu.getCreation();
		this.orders = menu.getOrders();
		if("-1".equals(menu.getOnlabeling())){
			this.checkGroup = true;
		}else{
			this.checkGroup = false;
		}
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getLabeling() {
		return labeling;
	}

	public void setLabeling(String labeling) {
		this.labeling = labeling;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getOnlabeling() {
		return onlabeling;
	}

	public void setOnlabeling(String onlabeling) {
		this.onlabeling = onlabeling;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public Timestamp getCreation() {
		return creation;
	}

	public void setCreation(Timestamp creation) {
		this.creation = creation;
	}

	public boolean isCheckGroup() {
		return checkGroup;
	}

	public void setCheckGroup(boolean checkGroup) {
		this.checkGroup = checkGroup;
	}

	public List<SysMenuVo> getChildren() {
		return children;
	}

	public void setChildren(List<SysMenuVo> children) {
		this.children = children;
	}

	public Integer getOrders() {
		return orders;
	}

	public void setOrders(Integer orders) {
		this.orders = orders;
	}

}
